package com.eve.springcloud.controller;

import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class SysDeptController {
	
	@Resource
	private RestTemplate restTemplate;
	
	@Value("${service-url.nacos-user-service}")
	private String serverUrl;
	
	@RequestMapping(value = "/consumer/dept/get")
	public @ResponseBody String save() {
		return restTemplate.getForObject(serverUrl + "/dept/get", String.class);
	}

	
}
